package uk.ac.ncl.teach.ex.people;

/** 
 * UniversityPerson - simple representation of a Person at a University.
 *
 * @author Nick Cook &lt;nick.cook@ncl.ac.uk&gt;
 * @version $Revision: 1624 $<br />
 * $Date: 2011-01-17 12:20:26 +0000 (Mon, 17 Jan 2011) $<br />
 * Copyright (C) 2007 Newcastle University, UK
 */

public class UniversityPerson extends Person {
    private final String institution;

    /**
     * Construct a university person given name, age and institution.
     *
     * @param name the lecturer's name
     * @param age the lecturer's age
     * @param institution the lecturer's institution
     */
    public UniversityPerson(String name, int age, 
        String institution) {
        super(name, age);
        System.out.println(getClass() 
            + " called UniversityPerson constructor");
        this.institution = institution;
    }
    
    /**
     * Get the <code>institution</code> field.
     *
     * @return Returns the <code>institution</code> field
     */
    public String getInstitution() {
        return institution;
    }
    
    public void printDetails(){
    	super.printDetails();
    	System.out.println("Inst: " + institution);
    }
}
